package uy.com.tsi2G7.superbet.account;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;




@Table(name="ACCOUNT_MOVEMENTS")
@Entity
public class AccountMovement implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID")
	private int id;
	@Column(name="AMOUNT")
	private BigDecimal amount;
	@Column(name="DATE")
	private Timestamp date;
	@Column(name="TYPE")
	@Enumerated(EnumType.STRING)
	private MovementType type;//Deposito o Retiro
	@Column(name="USER",length=255)
	private String user;
	
	
	
	public AccountMovement() {
		super();
	}
	public AccountMovement(BigDecimal amount, Timestamp date,
			MovementType type, String user) {
		super();
		this.amount = amount;
		this.date = date;
		this.type = type;
		this.user = user;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public BigDecimal getAmount() {
		return amount;
	}
	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}
	public Timestamp getDate() {
		return date;
	}
	public void setDate(Timestamp date) {
		this.date = date;
	}
	public MovementType getType() {
		return type;
	}
	public void setType(MovementType type) {
		this.type = type;
	}
}
